package com.gd.coreservice.mapper;

import com.gd.coreservice.entity.Admin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2024-03-23
 */
@Mapper
public interface AdminMapper extends BaseMapper<Admin> {
    @Select("SELECT * FROM admin WHERE username=#{username} AND password=#{password}")
    Admin login(@Param("username") String username, @Param("password") String password);
    @Select("SELECT aid FROM admin WHERE username=#{username}")
    String findIdByusername(String username);



}
